<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link href="https://cdn.bootcss.com/Buttons/2.0.0/css/buttons.css" rel="stylesheet">
    <link rel="stylesheet" href="//at.alicdn.com/t/font_1234904_pvqsepg8ao.css">
    <style>
        * {
            padding: 0;
            margin: 0;
            list-style: none;
            outline: none;
        }

        .container {
            width: 1000px;
            padding: 20px;
            background: rgba(230, 226, 226, 0.603);
            margin: 100px auto;
        }

        .search {
            width: 800px;
            margin: 0 auto;
            display: flex;
            justify-content: center;
            height: 40px;
        }

        .search_in.active {
            border: 1px solid #1b9af7;
        }

        .search input {
            flex: 1;
            border: 1px solid transparent;
            text-indent: 20px;
        }

        .menu {
            display: flex;
            margin-top: 20px;
        }

        .menu li {
            padding: 10px 20px;
            transition: 0.5s;
        }

        .menu li.item {
            cursor: pointer;
        }

        .menu li.item.active {
            background: #1b9af7;
            color: #fff;
        }

        .contents {
            font-size: 14px;
            width: 800px;
            margin: 30px auto;
        }

        .contents li {
            padding: 10px;
            border-bottom: 1px dashed;

        }

        .other {
            font-size: 12px;
            color: #777;
            display: flex;
            justify-content: flex-end;
        }

        .layer {
            width: 100vw;
            height: 3px;
            background: #1b9af7;
            position: fixed;
            top: 0;
            left: 0;
            animation: 1s move infinite ease-in-out forwards;
        }

        .tags{
            display: flex;
        }

        .tags  .tag{
            background: skyblue;
            margin: 5px;
            padding: 5px 10px;
            color: #fff;
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="search">
            <input type="text" class="search_in">
            <button class="button btnsearch button-primary">搜索</button>
        </div>
        <!-- 类型 -->
        <ul class="menu typelist">
            <li>题型：</li>
            <li class="item active">全部</li>
        </ul>
        <script id="temp1" type="text/html">
            {{each $data item i}}
            <li class="item" data-id="{{item.id}}">{{item.name}}</li>
            {{/each}}
        </script>
        <!-- 科目 -->
        <ul class="menu subjectList">
            <li>科目：</li>
            <li class="item active">全部</li>
        </ul>
        <!-- 内容 -->
        <ul class="contents"></ul>

        <script id="temp2" type="text/html">
            {{each $data item i}}
            <li>
                <div> {{i+1}}.【{{ item.type | formatSubjectType}}】
                    {{@item.title}}</div>
                    <div  class="tags">
                        {{each item.tags item1 j }}
                            <div  class="tag">{{item1 | renderTags}}</div>
                        {{/each}}
                    </div>
                <div class="other">{{item.time}}
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <i class="iconfont icon-comment"></i>
                    &nbsp;&nbsp;{{item.commentCount}}
                </div>
            </li>
            {{/each}}
        </script>
    </div>
    <!-- 动画层 -->
    <div class="layer"></div>

    <!-- JS部分 -->
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.js"></script>
    <script src="js/artTemplate/artTemplate.js"></script>
    <script src="js/artTemplate/filter.js"></script>
    <script src="js/index.js"></script>
</body>

</html>